import { defineStore } from "pinia";

export const useSysStyleStore = defineStore('sys_style',{
  state: () => {
    return {
      headerHeight: 70,
      searchHeight: 0,
      tagsHeight: 30,
      tableOptionsHeight: 36,
      paginationHeight: 32
    }
  },
  getters: {
    tableHeight: state => {
      return `calc(100vh - ${state.headerHeight + state.tagsHeight + state.paginationHeight + state.tableOptionsHeight + state.searchHeight}px)`
    }
  },
  actions: {
    setSearchHeight(datas: NumberOrString) {
      this.searchHeight = +datas
    }
  }
})